package com.examples.util;

public class CustomException extends RuntimeException {
    static final long serialVersionUID = -3146816159357229948L;

    private String errorCode;

    private String errorMsg;

    private String[] variables;

    public CustomException(String errorCode, String errorMsg, String... variables) {
        super(errorMsg);
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
        this.variables = variables;
    }

    public CustomException(String errorCode, String errorMsg, Throwable cause,String...  variables) {
        super(errorMsg, cause);
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
        this.variables = variables;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public String[] getVariables() {
        return this.variables;
    }
}
